package com.haste.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @ClassName:DeptRestTemplate
 * @Description:
 * @Author:Haste
 * @Date:2021/2/2 9:35
 */
@Configuration
public class DeptRestTemplate {
    @Bean
    @LoadBalanced //负载均衡（ribbon）
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }

}
